#include "uart.h"
#include <stdio.h>


#if 1
#pragma import(__use_no_semihosting)
struct __FILE
{
    int handle;
};
FILE __stdout;

void _sys_exit(int x)
{
    x = x;
}

int fputc(int ch, FILE *f)
{
    UART0->TXBUF = ch;
    while(!(UART0->ISR & (0x1 << 0)));
    UART0->ISR |= (0x1 << 0);

    return ch;
}
#endif
